package com.huifaapp.mall.dialogs;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.huifaapp.mall.R;

/**
 * @desc
 * @auth Mr Wu Fan
 * Created by you on 2018/3/27.
 */

public class CustomDialog extends Dialog {
    private TextView tvarrival_amount;
    private  TextView tv_service_charge;
    private Button cancel;
    private  Button  affirm;

    public CustomDialog(@NonNull Context context) {
        super(context);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.setCancelable(false);  // 是否可以撤销
        setContentView(R.layout.dialog_custom);
        tvarrival_amount = (TextView) findViewById(R.id.arrival_amount);
        tv_service_charge = (TextView) findViewById(R.id.tv_service_charge);
        cancel = (Button) findViewById(R.id.cancel);
        affirm = (Button) findViewById(R.id.affirm);
    }
        /*
                取消
         */
    public  void setcancelButton(View.OnClickListener clickListener){
        cancel.setOnClickListener(clickListener);

    }
    /*
       确认
     */
    public  void setaffirmButton(View.OnClickListener clickListener){
        affirm.setOnClickListener(clickListener);
    }
    /*
                到账余额
     */
    public  void settvarrivalamount(String str){
        tvarrival_amount.setText(str );

    }
    /*
            手续费
     */
    public  void settvcharge(String str){
        tv_service_charge.setText(str);
    }
}
